package main

import (
	"3-19yk/common/conult"
	"3-19yk/common/grpc"
	"3-19yk/common/models/es"
	"3-19yk/common/models/mysql"
	"3-19yk/common/nacos"
	"3-19yk/pkg/cron"
	"3-19yk/service/config"
	"3-19yk/service/internal"
	grpc2 "google.golang.org/grpc"
)

func main() {
	cron.UpdateStatusCron()
	config.Init()
	nacos.NewNaCos()
	conult.Conult()
	mysql.MysqlInit()
	es.EsInit()
	nac := nacos.Config.Grpc
	grpc.RegisterGrpc(nac.Host, nac.Port, func(registrar grpc2.ServiceRegistrar) {
		internal.Register(registrar)
	})
}
